const files = import.meta.globEager('./modules/*.ts')

const modulesObj: any = {}
Object.keys(files).forEach((key: string) => {
  const newKey = key.replace(/\.\/modules\/|\.ts|\.js/g, '')
  modulesObj[newKey] = files[key].default
})

export const api = {
  ...modulesObj
}
